All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.util.QTHandleRef

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.util.QTHandleRef

public class QTHandleRef
extends QTObject
implements QuickTimeLib
A QTHandleRef is a "smart" handle in that it can be either a Reference to a handle which is not disposable, or it can be a real "independent" handle which is automatically disposed on finalization.
The default setting is for the Handle to be disposable - subclasses must use the QTHandleRef(int, Object) constructor to create a non-disposable reference For non-disposable handles there are two situations to look out for:
(1) Upon finalization the handle should NOT be disposed - it belongs to a parent struct
(2) The parent object from which the handle is obtained should not be allowed to go away whilst the reference object is alive.
In both situations we must maintain a reference to the parent or owner object. When defining a clone operation subclasses should define it as:
public Object clone() { return new QTHandleSubclass (makeAndCopyHandle (), null); }


Method Index

 o copyFromArray(int, byte[], int, int)
An efficient byte[] copy that copies length bytes from the byte array to the handle.
 o copyFromArray(int, char[], int, int)
An efficient char[] copy that copies length chars from the byte array to the handle.
 o copyFromArray(int, double[], int, int)
An efficient double[] copy that copies length doubles from the byte array to the handle.
 o copyFromArray(int, float[], int, int)
An efficient float[] copy that copies length floats from the byte array to the handle.
 o copyFromArray(int, int[], int, int)
An efficient int[] copy that copies length ints from the byte array to the handle.
 o copyFromArray(int, long[], int, int)
An efficient long[] copy that copies length longs from the byte array to the handle.
 o copyFromArray(int, short[], int, int)
An efficient short[] copy that copies length shorts from the byte array to the handle.
 o copyToArray(int, byte[], int, int)
An efficient byte[] copy that copies length bytes from the handle to the byte array.
 o copyToArray(int, char[], int, int)
An efficient char[] copy that copies length chars from the handle to the char array.
 o copyToArray(int, double[], int, int)
An efficient double[] copy that copies length doubles from the handle to the double array.
 o copyToArray(int, float[], int, int)
An efficient float[] copy that copies length floats from the handle to the float array.
 o copyToArray(int, int[], int, int)
An efficient int[] copy that copies length ints from the handle to the int array.
 o copyToArray(int, long[], int, int)
An efficient long[] copy that copies length longs from the handle to the long array.
 o copyToArray(int, short[], int, int)
An efficient short[] copy that copies length shorts from the handle to the short array.
 o fromCompressionDialogState(CompressionDialog)
Retrieves all of the settings for a dialog.
 o fromSCSequence(SCSequence, QDGraphics, QDRect)
Compresses a frame that is sourced by a PixMap from the supplied QDGraphics, returning the compressed data.
 o getBytes()
Returns a copy of the data of the handle as a byte array
 o getSize()
This method returns the size (number of bytes) of the handle

QuickTime::GetHandleSize

 o inMemory()
checks this handles purgedness
 o isLocked()
Returns true if the handle is locked otherwise false.
 o lock()
Locks the relocatable block.
 o lockHigh()
Moves the relocatable block to the top of the heap and locks it.
 o moveHigh()
Move the handle to high memory.
 o toQTPointer()
Locks the handle and returns a pointer object.
 o toQTPointer(int, int)
Locks the handle and returns a pointer object.
 o toString()
A String representation of the class.
 o unlock()
Unlocks the relocatable block.

Methods

 o fromSCSequence
 public static SCInfo fromSCSequence(SCSequence sc,
                                     QDGraphics src,
                                     QDRect srcRect) throws QTException
Compresses a frame that is sourced by a PixMap from the supplied QDGraphics, returning the compressed data.

QuickTime::SCCompressSequenceFrame()

Parameters:
src - the PixMap's source QDGraphics.
srcRect - you can specify to compress just a part of the pix map by specifying a rectangle - or pass in null to compress the entire pix map.
Returns:
an image data object.
 o fromCompressionDialogState
 public static QTHandleRef fromCompressionDialogState(CompressionDialog cd) throws QTException
Retrieves all of the settings for a dialog.

QuickTime::SCRequestImageSettings()

See Also:
getInfoState
 o getSize
 public int getSize()
This method returns the size (number of bytes) of the handle

QuickTime::GetHandleSize

Returns:
the size of the handle
 o getBytes
 public byte[] getBytes()
Returns a copy of the data of the handle as a byte array

Returns:
a byte array - copy of handle data
 o copyToArray
 public final void copyToArray(int handleOffset,
                               byte destArray[],
                               int destOffset,
                               int length)
An efficient byte[] copy that copies length bytes from the handle to the byte array.

Parameters:
handleOffset - the byte offset from the handle to copy the bytes from
destArray - the destination byte array
destOffset - the offset within the byte array to start copying to
length - the number of bytes to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               short destArray[],
                               int destOffset,
                               int length)
An efficient short[] copy that copies length shorts from the handle to the short array.

Parameters:
handleOffset - the byte offset from the handle to copy the shorts from
destArray - the destination short array
destOffset - the offset within the short array to start copying to
length - the number of shorts to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               char destArray[],
                               int destOffset,
                               int length)
An efficient char[] copy that copies length chars from the handle to the char array.

Parameters:
handleOffset - the byte offset from the handle to copy the chars from
destArray - the destination char array
destOffset - the offset within the char array to start copying to
length - the number of chars to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               int destArray[],
                               int destOffset,
                               int length)
An efficient int[] copy that copies length ints from the handle to the int array.

Parameters:
handleOffset - the byte offset from the handle to copy the ints from
destArray - the destination int array
destOffset - the offset within the int array to start copying to
length - the number of ints to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               float destArray[],
                               int destOffset,
                               int length)
An efficient float[] copy that copies length floats from the handle to the float array.

Parameters:
handleOffset - the byte offset from the handle to copy the floats from
destArray - the destination float array
destOffset - the offset within the float array to start copying to
length - the number of floats to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               long destArray[],
                               int destOffset,
                               int length)
An efficient long[] copy that copies length longs from the handle to the long array.

Parameters:
handleOffset - the byte offset from the handle to copy the longs from
destArray - the destination long array
destOffset - the offset within the long array to start copying to
length - the number of longs to copy
 o copyToArray
 public final void copyToArray(int handleOffset,
                               double destArray[],
                               int destOffset,
                               int length)
An efficient double[] copy that copies length doubles from the handle to the double array.

Parameters:
handleOffset - the byte offset from the handle to copy the doubles from
destArray - the destination double array
destOffset - the offset within the double array to start copying to
length - the number of doubles to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 byte srcArray[],
                                 int srcOffset,
                                 int length)
An efficient byte[] copy that copies length bytes from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the byte[] to copy
srcOffset - the nth index within the byte [] to start copying from
length - how many elements of the byte array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 short srcArray[],
                                 int srcOffset,
                                 int length)
An efficient short[] copy that copies length shorts from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the short[] to copy
srcOffset - the nth index within the short array to start copying from
length - how many elements of the short array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 char srcArray[],
                                 int srcOffset,
                                 int length)
An efficient char[] copy that copies length chars from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the char[] to copy
srcOffset - the nth index within the char array to start copying from
length - how many elements of the char array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 int srcArray[],
                                 int srcOffset,
                                 int length)
An efficient int[] copy that copies length ints from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the int[] to copy
srcOffset - the nth index within the int array to start copying from
length - how many elements of the int array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 float srcArray[],
                                 int srcOffset,
                                 int length)
An efficient float[] copy that copies length floats from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the float[] to copy
srcOffset - the nth index within the float array to start copying from
length - how many elements of the float array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 long srcArray[],
                                 int srcOffset,
                                 int length)
An efficient long[] copy that copies length longs from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the long[] to copy
srcOffset - the nth index within the long array to start copying from
length - how many elements of the long array to copy
 o copyFromArray
 public final void copyFromArray(int handleOffset,
                                 double srcArray[],
                                 int srcOffset,
                                 int length)
An efficient double[] copy that copies length doubles from the byte array to the handle.

Parameters:
handleOffset - how many bytes offset from the base handle to copy to.
srcArray - the double[] to copy
srcOffset - the nth index within the double array to start copying from
length - how many elements of the double array to copy
 o inMemory
 public boolean inMemory()
checks this handles purgedness

 o isLocked
 public final boolean isLocked()
Returns true if the handle is locked otherwise false.

 o lock
 public final void lock()
Locks the relocatable block.

 o unlock
 public final void unlock()
Unlocks the relocatable block.

 o lockHigh
 public void lockHigh()
Moves the relocatable block to the top of the heap and locks it.

QuickTime::HLockHi QuickTime::HLockHi

 o moveHigh
 public final void moveHigh()
Move the handle to high memory. Typically you call this before locking a small handle that is going to be locked for a short period of time.

QuickTime::MoveHHi QuickTime::MoveHHi

 o toString
 public String toString()
A String representation of the class.

Overrides:
toString in class QTObject
 o toQTPointer
 public QTPointerRef toQTPointer()
Locks the handle and returns a pointer object. You must keep the handle locked for the lifetime of the returned pointer.

Returns:
an object representing the pointer.
 o toQTPointer
 public QTPointerRef toQTPointer(int offset,
                                 int size)
Locks the handle and returns a pointer object. The handle should remain locked for the lifetime of the returned pointer. It will return a pointer that is offset within the handle that has a valid access to size bytes from the offset

Parameters:
offset - the number of bytes to offset within the handle
size - the number of bytes the pointer has valid access to.
Returns:
an object representing the pointer.

All Packages  Class Hierarchy  This Package  Previous  Next  Index